From 6b50788901a6053e588c7f41ef358b768eca8222 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 24 Mar 2018 10:05:34 +0000 Subject: [PATCH] GDK W32: Init display scale to the global Windows scale, not 1 This affects gdk_device_query_state() for the virtual device. It has no window, and is forced to query the display itself, and display defaults its scale to 1 even for HiDPI desktops. Use the same "query scale of a NULL monitor" trick that we use in other places to get the global desktop scale. https://bugzilla.gnome.org/show_bug.cgi?id=773299 --- gdk/win32/gdkdisplay-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c index c0358ab119..821124ee3f 100644 --- a/gdk/win32/gdkdisplay-win32.c +++ b/gdk/win32/gdkdisplay-win32.c @@ -972,7 +972,7 @@ gdk_win32_display_init (GdkWin32Display *display) display->has_fixed_scale = TRUE; } else - display->surface_scale = 1; + display->surface_scale = _gdk_win32_display_get_monitor_scale_factor (display, NULL, NULL, NULL); _gdk_win32_display_init_cursors (display); gdk_win32_display_check_composited (display); -- 2.30.2